<template>
	<base-breadcrumb>
		<template>
			<div class="table-page-search-wrapper">
          <div style="display:flex;float:right" class="page-btn-right-top">
            <a-button class="button" type="primary">保存草稿</a-button>
            <a-button class="button"  type="primary">提交</a-button>
            <a-button  class="button" type="primary">返回</a-button>
          </div>
				<title-name title="基本信息"></title-name>
				<!-- <div>
					<a-button>删除</a-button>
					<a-button>草稿</a-button>
					<a-button>提交</a-button>
					<a-button>关闭</a-button>
				</div> -->
				<a-form >
					<a-row :gutter="24">
						<a-col :md="12" :sm="12">
							<a-form-item label="所属分公司" 
							:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
							:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
								<a-select placeholder="请选择">
									<a-select-option value="0">是</a-select-option>
									<a-select-option value="1">否</a-select-option>
								</a-select>
							</a-form-item>
						</a-col>
						<a-col :md="12" :sm="12">
							<a-form-item label="所属项目" 
							:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
							:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
								<BaseInput v-model="queryParam.projectName" />
							</a-form-item>
						</a-col>
						<a-col :md="12" :sm="12">
							<a-row>
								<a-col :md="24" :sm="24">
									<a-form-item label="名称" 
									:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
									:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
										<BaseInput placeholder="" v-model="queryParam.vompletedBy" />
									</a-form-item>
								</a-col>
								<a-col :md="24" :sm="24">
									<a-form-item label="项目地点" 
									:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
									:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
										<BaseInput placeholder="" v-model="queryParam.vompletedBy" disabled/>
									</a-form-item>
								</a-col>
							</a-row>
						</a-col>
						<a-col :md="12" :sm="12">
							<a-form-item label="项目概况" 
							:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
							:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }" disabled>
								<BaseTextarea  :rows="4" />
							</a-form-item>
						</a-col>
					</a-row>
				</a-form>
			</div>
		</template>
		<a-card>
			<div class="table-operator">
				<title-name title="施组(方案)审批计划表"></title-name>
				<a-button @click="addd">添加计划项</a-button>
			</div>
			<a-table :data-source="dataSource" :columns="columns" bordered>
				<span slot="description" slot-scope="text">
					<ellipsis :length="8" tooltip>{{ text }}</ellipsis>
				</span>
				<span slot="serial" slot-scope="text, record, index">{{ index + 1 }}</span>
				<!-- 操作 -->
				<span slot="operation" slot-scope="text, record">
					<template>
						<a @click="addSee(record)">编辑</a>
						<a-divider type="vertical" />
						<a @click="addEdit(record)">删除</a>
					</template>
				</span>
			</a-table>
		</a-card>
		<EditFrom
		:visible ="visible"
		@cancel="handleCancel"
		:model = "transmitList"
		@ok="handleOk"
		>
		</EditFrom>
	</base-breadcrumb>
</template>

<script>
	import TitleName from '@/components/TitleName/index.vue'
  import EditFrom from './EditFrom.vue'
  import { getList} from '@/api/technical/approvalPlan'
	const columns = [
		{
			title: '序号',
			width: '80px',
			scopedSlots: { customRender: 'serial' }
		},
		{
			title: '施组(方案)名称',
			dataIndex: 'schemeName'
		},
		{
			title: '方案类别',
			dataIndex: 'schemeCategory'
		},
		{
			title: '计划报审时间',
			dataIndex: 'planReviewTime'
		},
		{
			title: '要求审批完成时间',
			dataIndex: 'reviewEndTime'
		},
		{
			title: '审批其他需求',
			dataIndex: 'reviewOtherRequirements'
		},
		{
			title: '操作',
			dataIndex: 'operation',
			width: '120px',
			scopedSlots: { customRender: 'operation' }
		}
	];
	const dataSource = [
		{
			projectName:1111,
			timeForComplation:2222,
			branchCompany:33333,
			vompletedBy:44444,
			status:1,
			fillingInTime:5555555
		}
	]
	export default{
		components:{
			EditFrom,TitleName
		},
		data(){
			this.columns = columns
			this.dataSource = dataSource
			return{
				advanced:false,
				queryParam:{},
				visible:false
			}
		},
		methods:{
			// 展开收起状态
			toggleAdvanced(){
				this.advanced = !this.advanced
      },
      getList(){

      },
			handleOk(){
				this.visible = false
			},
			handleCancel(){
				this.visible = false
			},
			addSee(){
				this.visible = true
			},
			addEdit(){
				
			},
			addd(){
				this.visible = true
			}
		}
	}
</script>

<style>
.button{
  margin:10px
}
</style>
